<?php

require_once("../private/system/dycmsapi.php");

try {
	
dyInit();
uiLoadLibrary('client');
uiLoadLibrary('page');

//
// Create the page
//

$page = new cHtmlPage();

$page->AddChild($main = new cUiLayer(array('id' => 'centre')));
$main->AddChild($topBar = new cUiLayer(array('id' => 'topBar')));

// Top Bar
$topBar->AddChild( <<<END
<span id="topNav">
	<div class="lblLogoSmall">wtfOMG</div>
	<span class="lblGames">Games</span>
	<span class="lblShop">Shop</span>
	<span class="lblFriends">Friends</span>
	<span class="lblClans">Clans</span>
</span>
<span id="topGamerID">
	<span class="lblGamerID">Gamer ID:</span>
	<span class="gamerID">teh_senaus</span>
</span>
END
);


$main->AddChild($topSect = new cUiLayer(array('id' => 'topSection')));

$topSect->AddChild($widget = new cUiLayer(array('id' => 'mainWidget')));
$topSect->AddChild($logo = new cUiLayer(array('id' => 'mainLogo')));

$main->AddChild($modules = new cUiLayer(array('id' => 'sideWidget')));
$main->AddChild($content = new cUiLayer(array('class' => 'sideWidgetDisplaced')));

$page->SetContentNode($content);
$page->AddModuleContainer($modules);


$page->AddModule(new cAdminMenuModule());
$widget->AddChild(new modLogin());

// Link in styles and scripts
$page->AddHtmlHeader(<<<HTMLEND
<link rel="stylesheet" href="style.css" />
<script src="nav.js"></script>
HTMLEND
);

$page->AddMetaData('keywords', 'online gaming,multiplayer,mmo,free games');


//
// Process commands
//

processCmsCommands($page, 'wtfomg');

$page->Display();

dyEnd();

}
catch(Exception $e)
{
	$ex = new cUiException($e);
	$ex->Display();
}

?>